<!--<!DOCTYPE html>-->
<!--<html lang="en">-->
<!--<head>-->
<!--    <meta charset="UTF-8">-->
<!--    <title>Title</title>-->
<!--</head>-->
<!--<body>-->
<!--{% for t in title %}-->
<!--    <p>-->
<!--        {{ t.id }}-->
<!--    </p>-->
<!--{% endfor %}-->
<!--</body>-->
<!--</html>-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>搜索结果显示</title>
</head>
<body>
<table border="1">
    <tr>
        <th>id</th>
        <th>title</th>
        <th>price</th>
        <th> retail_price</th>
        <th>public</th>
    </tr>
    {% for book in books %}
    <tr>
        <td>{{ book.id }}</td>
        <td>{{ book.title }}</td>
        <td>{{ book.price }}</td>
        <td>{{ book.retail_price }}</td>
        <!--外键关联字段取值-->
        <td>{{ book.pub.pubname}}</td>
    </tr>
     {% endfor %}
    </table>
</body>
</html>